package com.vhall.component.controller.chat;

import com.vhall.component.controller.chat.facade.ChatApiFacade;
import com.vhall.component.entity.chat.vo.ChatImgUploadVo;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.plugin.common.annotation.ApiSignatureAuth;
import com.vhall.component.plugin.common.annotation.VssTokenAuth;
import com.vhall.component.service.chat.ChatService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * @author xianglei
 * @date 2021/6/18 15:57
 */

@VhallComponent
public class ChatApiController implements ChatApiFacade {

    @Autowired
    private ChatService chatService;

    /**
     * 聊天图片上传
     *
     * @param vo
     * @return
     */
    @ApiSignatureAuth
    @VssTokenAuth
    @Override
    public Map<String, Object> upload(ChatImgUploadVo vo) {
        return chatService.imageUpload(vo.getFile());
    }
}
